X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=daemon%2Fui.c;h=8e9b64345d501ff606631df5605405dbd4bbc27f;hb=48f7dc10b52a13f7c5dfc11e84b428c4e3e26550;hp=795f7d7c496bd36df0d8f4fc47398d36f25f1964;hpb=c45c9b793539cdabca7f47563087579755ab74ac;p=doldaconnect.git diff --git a/daemon/ui.c b/daemon/ui.c index 795f7d7..8e9b643 100644 --- a/daemon/ui.c +++ b/daemon/ui.c @@ -324,7 +324,7 @@ static int haspriv(struct uidata *data, int perm) /* Useful macros for the command functions: */ #define haveargs(n) do { if(argc < n) { sq(sk, 0, L"501", L"Wrong number of arguments", NULL); return; } } while(0) -#define havepriv(p) do { if((data->userinfo == NULL) || ((data->userinfo->perms & (p)) != (p))) { sq(sk, 0, L"502", L"Unauthorized request", L"needed", L"%x", (p), L"had", L"%x", data->userinfo->perms, NULL); return; } } while(0) +#define havepriv(p) do { if((data->userinfo == NULL) || ((data->userinfo->perms & (p)) != (p))) { sq(sk, 0, L"502", L"Unauthorized request", L"needed", L"%x", (p), NULL); return; } } while(0) static void cmd_connect(struct socket *sk, struct uidata *data, int argc, wchar_t **argv) { @@ -1435,7 +1435,7 @@ static void notifappendv(struct notif *notif, va_list args) notif->argv[ca].d.n = va_arg(args, int); break; case NOTIF_STR: - notif->argv[ca].d.s = wcsdup(va_arg(args, wchar_t *)); + notif->argv[ca].d.s = swcsdup(va_arg(args, wchar_t *)); break; case NOTIF_FLOAT: notif->argv[ca].d.d = va_arg(args, double);