Rev 5541 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5541 | Rev 5770 | ||
---|---|---|---|
Line 73... | Line 73... | ||
73 | dec ecx |
73 | dec ecx |
74 | inc ebx |
74 | inc ebx |
75 | mcall 54 |
75 | mcall 54 |
76 | cmp eax, -1 |
76 | cmp eax, -1 |
77 | je error |
77 | je error |
- | 78 | cmp eax, 1 |
|
- | 79 | je error |
|
Line 78... | Line 80... | ||
78 | 80 | ||
79 | ; Verify if we can work with it |
81 | ; Verify if we can work with it |
80 | mov [clipboard_data], eax |
82 | mov [clipboard_data], eax |
81 | cmp dword[eax + 4], 0 ; text ? |
83 | cmp dword[eax + 4], 0 ; text ? |
Line 99... | Line 101... | ||
99 | push eax |
101 | push eax |
100 | mcall 68, 13, [clipboard_data] |
102 | mcall 68, 13, [clipboard_data] |
101 | pop [clipboard_data] |
103 | pop [clipboard_data] |
Line 102... | Line 104... | ||
102 | 104 | ||
103 | ; Connect to the server |
105 | ; Connect to the server |
104 | invoke HTTP_get, sz_url, 0, 0, 0 |
106 | invoke HTTP_get, sz_url, 0, FLAG_BLOCK or FLAG_KEEPALIVE, 0 |
105 | test eax, eax |
107 | test eax, eax |
106 | jz error_free_clip |
108 | jz error_free_clip |
Line 107... | Line 109... | ||
107 | mov [identifier], eax |
109 | mov [identifier], eax |
Line 133... | Line 135... | ||
133 | mov ax, 0x0a0d |
135 | mov ax, 0x0a0d |
134 | stosw |
136 | stosw |
135 | xor al, al |
137 | xor al, al |
136 | stosb |
138 | stosb |
Line 137... | Line -... | ||
137 | - | ||
138 | invoke HTTP_free, [identifier] |
- | |
139 | 139 | ||
140 | mov ecx, [clipboard_data_length] |
140 | mov ecx, [clipboard_data_length] |
141 | add ecx, sz_paste_head.length + sz_paste_tail.length |
141 | add ecx, sz_paste_head.length + sz_paste_tail.length |
142 | invoke HTTP_post, sz_url, 0, 0, sz_cookie, sz_ctype, ecx |
142 | invoke HTTP_post, sz_url, [identifier], FLAG_BLOCK, sz_cookie, sz_ctype, ecx |
143 | test eax, eax |
143 | test eax, eax |
144 | jz error_free_clip |
- | |
Line 145... | Line 144... | ||
145 | mov [identifier], eax |
144 | jz error_free_clip_disconnect |
146 | 145 | ||
147 | ; Send the data to the server |
146 | ; Send the data to the server |
148 | mov ecx, [eax + http_msg.socket] |
147 | mov ecx, [eax + http_msg.socket] |
Line 156... | Line 155... | ||
156 | .again2: |
155 | .again2: |
157 | invoke HTTP_receive, [identifier] |
156 | invoke HTTP_receive, [identifier] |
158 | test eax, eax |
157 | test eax, eax |
159 | jnz .again2 |
158 | jnz .again2 |
Line -... | Line 159... | ||
- | 159 | ||
- | 160 | invoke HTTP_disconnect, [identifier] |
|
160 | 161 | ||
161 | mov ebp, [identifier] |
162 | mov ebp, [identifier] |
162 | cmp [ebp + http_msg.status], 302 ; found |
163 | cmp [ebp + http_msg.status], 302 ; found |
Line 163... | Line 164... | ||
163 | jne error_free_http |
164 | jne error_free_http |
Line 203... | Line 204... | ||
203 | mcall -1 |
204 | mcall -1 |
Line 204... | Line 205... | ||
204 | 205 | ||
205 | error_free_http: |
206 | error_free_http: |
206 | invoke HTTP_free, [identifier] |
207 | invoke HTTP_free, [identifier] |
- | 208 | jmp error |
|
- | 209 | error_free_clip_disconnect: |
|
- | 210 | invoke HTTP_disconnect, [identifier] |
|
207 | jmp error |
211 | invoke HTTP_free, [identifier] |
208 | error_free_clip: |
212 | error_free_clip: |
209 | mcall 68, 13, [clipboard_data] |
213 | mcall 68, 13, [clipboard_data] |
210 | error: |
214 | error: |
211 | mov [notify_struct.msg], sz_failed |
215 | mov [notify_struct.msg], sz_failed |
Line 226... | Line 230... | ||
226 | HTTP_get, 'get', \ |
230 | HTTP_get, 'get', \ |
227 | HTTP_post, 'post', \ |
231 | HTTP_post, 'post', \ |
228 | HTTP_receive, 'receive', \ |
232 | HTTP_receive, 'receive', \ |
229 | HTTP_find_header_field, 'find_header_field', \ |
233 | HTTP_find_header_field, 'find_header_field', \ |
230 | HTTP_free, 'free', \ |
234 | HTTP_free, 'free', \ |
231 | HTTP_escape, 'escape' |
235 | HTTP_escape, 'escape', \ |
- | 236 | HTTP_disconnect, 'disconnect' |
|
Line 232... | Line 237... | ||
232 | 237 | ||
Line 233... | Line 238... | ||
233 | IM_END: |
238 | IM_END: |
234 | 239 |