*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
+ } else if(!wcscmp(tpart, L"zi")) {
+ freepart = 1;
+ part = swprintf2(L"%zi", va_arg(al, size_t));
+ } else if(!wcscmp(tpart, L"oi")) {
+ freepart = 1;
+ part = swprintf2(L"%ji", (intmax_t)va_arg(al, off_t));
} else if(!wcscmp(tpart, L"s")) {
freepart = 1;
part = icmbstowcs(sarg = va_arg(al, char *), NULL);
} else if(!wcscmp(tpart, L"s")) {
freepart = 1;
part = icmbstowcs(sarg = va_arg(al, char *), NULL);
- transfersetsize(transfer, wcstol(argv[4], NULL, 0));
+ transfersetsize(transfer, wcstoll(argv[4], NULL, 0));
L"%i", pt->state, pt->peerid,
(pt->peernick == NULL)?L"":(pt->peernick),
(pt->path == NULL)?L"":(pt->path),
L"%i", pt->state, pt->peerid,
(pt->peernick == NULL)?L"":(pt->peernick),
(pt->path == NULL)?L"":(pt->path),
- L"%i", pt->size, L"%i", pt->curpos,
+ L"%oi", pt->size, L"%oi", pt->curpos,
L"%i", pt->state, pt->peerid,
(pt->peernick == NULL)?L"":(pt->peernick),
(pt->path == NULL)?L"":(pt->path),
L"%i", pt->state, pt->peerid,
(pt->peernick == NULL)?L"":(pt->peernick),
(pt->path == NULL)?L"":(pt->path),
- L"%i", pt->size, L"%i", pt->curpos,
+ L"%oi", pt->size, L"%oi", pt->curpos,
for(sr = srch->results; sr != NULL; sr = sr->next)
{
sq(sk, (sr->next != NULL)?1:0, L"200", L"%ls", sr->filename,
for(sr = srch->results; sr != NULL; sr = sr->next)
{
sq(sk, (sr->next != NULL)?1:0, L"200", L"%ls", sr->filename,
- sr->fnet->name, L"%ls", sr->peerid, L"%i", sr->size,
+ sr->fnet->name, L"%ls", sr->peerid, L"%oi", sr->size,
L"%i", sr->slots, L"%i", (sr->fn == NULL)?-1:(sr->fn->id),
L"%f", sr->time,
L"%ls", (sr->hash == NULL)?L"":unparsehash(sr->hash), NULL);
L"%i", sr->slots, L"%i", (sr->fn == NULL)?-1:(sr->fn->id),
L"%f", sr->time,
L"%ls", (sr->hash == NULL)?L"":unparsehash(sr->hash), NULL);
- newnotif(data, 622, NOTIF_ID, srch->id, NOTIF_STR, sr->filename, NOTIF_STR, sr->fnet->name, NOTIF_STR, sr->peerid, NOTIF_INT, sr->size,
+ newnotif(data, 622, NOTIF_ID, srch->id, NOTIF_STR, sr->filename, NOTIF_STR, sr->fnet->name, NOTIF_STR, sr->peerid, NOTIF_OFF, sr->size,
NOTIF_INT, sr->slots, NOTIF_INT, (sr->fn == NULL)?-1:(sr->fn->id), NOTIF_FLOAT, sr->time, NOTIF_STR, (sr->hash == NULL)?L"":unparsehash(sr->hash), NOTIF_END);
}
}
NOTIF_INT, sr->slots, NOTIF_INT, (sr->fn == NULL)?-1:(sr->fn->id), NOTIF_FLOAT, sr->time, NOTIF_STR, (sr->hash == NULL)?L"":unparsehash(sr->hash), NOTIF_END);
}
}
for(data = actives; data != NULL; data = data->next)
{
if(haspriv(data, PERM_TRANS) && data->notify.b.tract && ((transfer->owner == 0) || (transfer->owner == data->uid)))
for(data = actives; data != NULL; data = data->next)
{
if(haspriv(data, PERM_TRANS) && data->notify.b.tract && ((transfer->owner == 0) || (transfer->owner == data->uid)))
- newnotif(data, 613, NOTIF_ID, transfer->id, NOTIF_INT, transfer->size, NOTIF_END);
+ newnotif(data, 613, NOTIF_ID, transfer->id, NOTIF_OFF, transfer->size, NOTIF_END);
}
} else if(!wcscmp(attrib, L"error")) {
for(data = actives; data != NULL; data = data->next)
}
} else if(!wcscmp(attrib, L"error")) {
for(data = actives; data != NULL; data = data->next)
if(haspriv(data, PERM_TRANS) && data->notify.b.trprog && ((transfer->owner == 0) || (transfer->owner == data->uid)))
{
if((notif = findnotif(data->fnotif, 1, NOTIF_PEND, 615, transfer->id)) != NULL)
if(haspriv(data, PERM_TRANS) && data->notify.b.trprog && ((transfer->owner == 0) || (transfer->owner == data->uid)))
{
if((notif = findnotif(data->fnotif, 1, NOTIF_PEND, 615, transfer->id)) != NULL)
- newnotif(data, 615, NOTIF_ID, transfer->id, NOTIF_INT, transfer->curpos, NOTIF_END)->rlimit = 0.5;
+ newnotif(data, 615, NOTIF_ID, transfer->id, NOTIF_OFF, transfer->curpos, NOTIF_END)->rlimit = 0.5;
if(((un = makeunixname()) != NULL) && ((newsock = netcslistenlocal(SOCK_STREAM, (struct sockaddr *)un, sizeof(*un), uiaccept, NULL)) == NULL))
{
if(((un = makeunixname()) != NULL) && ((newsock = netcslistenlocal(SOCK_STREAM, (struct sockaddr *)un, sizeof(*un), uiaccept, NULL)) == NULL))
{
flog(LOG_WARNING, "could not create new Unix UI socket, reverting to old: %s", strerror(errno));
return(0);
}
flog(LOG_WARNING, "could not create new Unix UI socket, reverting to old: %s", strerror(errno));
return(0);
}
return(1);
}
CBREG(confgetvar("ui", "port"), conf_update, tcpportupdate, NULL, NULL);
return(1);
}
CBREG(confgetvar("ui", "port"), conf_update, tcpportupdate, NULL, NULL);
if(((un = makeunixname()) != NULL) && ((unixsocket = netcslistenlocal(SOCK_STREAM, (struct sockaddr *)un, sizeof(*un), uiaccept, NULL)) == NULL))
{
if(((un = makeunixname()) != NULL) && ((unixsocket = netcslistenlocal(SOCK_STREAM, (struct sockaddr *)un, sizeof(*un), uiaccept, NULL)) == NULL))
{
CBREG(confgetvar("ui", "unixsock"), conf_update, unixsockupdate, NULL, NULL);
GCBREG(newfncb, newfnetnode, NULL);
GCBREG(newtransfercb, newtransfernotify, NULL);
CBREG(confgetvar("ui", "unixsock"), conf_update, unixsockupdate, NULL, NULL);
GCBREG(newfncb, newfnetnode, NULL);
GCBREG(newtransfercb, newtransfernotify, NULL);
case NOTIF_ID:
sq(data->sk, 2, L"%i", notif->argv[i].d.n, NULL);
break;
case NOTIF_ID:
sq(data->sk, 2, L"%i", notif->argv[i].d.n, NULL);
break;
case NOTIF_STR:
if(notif->argv[i].d.s[0] == L'%')
sq(data->sk, 2, L"%ls", notif->argv[i].d.s, NULL);
case NOTIF_STR:
if(notif->argv[i].d.s[0] == L'%')
sq(data->sk, 2, L"%ls", notif->argv[i].d.s, NULL);