equal
deleted
inserted
replaced
84 .send = send, |
84 .send = send, |
85 .stop = stop, |
85 .stop = stop, |
86 .info = info |
86 .info = info |
87 }; |
87 }; |
88 |
88 |
89 module_info_t info_jingle_filetransfer = { |
89 module_info_t info_jingle_ft = { |
90 .branch = MCABBER_BRANCH, |
90 .branch = MCABBER_BRANCH, |
91 .api = MCABBER_API_VERSION, |
91 .api = MCABBER_API_VERSION, |
92 .version = PROJECT_VERSION, |
92 .version = PROJECT_VERSION, |
93 .description = "Jingle File Transfer (XEP-0234)\n", |
93 .description = "Jingle File Transfer (XEP-0234)\n", |
94 .requires = deps, |
94 .requires = deps, |
298 |
298 |
299 |
299 |
300 static int _next_index(void) |
300 static int _next_index(void) |
301 { |
301 { |
302 static int a = 0; |
302 static int a = 0; |
303 return a++; |
303 return ++a; |
304 } |
304 } |
305 |
305 |
306 static void do_sendfile(char *arg) |
306 static void do_sendfile(char *arg) |
307 { |
307 { |
308 char **args = split_arg(arg, 3, 0); |
308 char **args = split_arg(arg, 3, 0); |
412 const gchar *dir = (jftio->jft->dir == JINGLE_FT_INCOMING) ? "<==" : "-->"; |
412 const gchar *dir = (jftio->jft->dir == JINGLE_FT_INCOMING) ? "<==" : "-->"; |
413 gfloat percent = (gfloat)jftio->jft->transmit/(gfloat)jftio->jft->size*100; |
413 gfloat percent = (gfloat)jftio->jft->transmit/(gfloat)jftio->jft->size*100; |
414 const gchar *state = strstate[jftio->jft->state]; |
414 const gchar *state = strstate[jftio->jft->state]; |
415 const gchar *desc = jftio->jft->desc?jftio->jft->desc:""; |
415 const gchar *desc = jftio->jft->desc?jftio->jft->desc:""; |
416 const gchar *hash = ""; |
416 const gchar *hash = ""; |
417 if (jftio->jft->state==JINGLE_FT_ENDING) { |
417 if (jftio->jft->dir == JINGLE_FT_INCOMING && |
|
418 jftio->jft->state == JINGLE_FT_ENDING) { |
418 if (_check_hash(jftio->jft->hash,jftio->jft->md5) == FALSE) |
419 if (_check_hash(jftio->jft->hash,jftio->jft->md5) == FALSE) |
419 hash = "corrupt"; |
420 hash = "corrupt"; |
420 else |
421 else |
421 hash = "checked"; |
422 hash = "checked"; |
422 } |
423 } |