Add some more logging
authorWouter Verhelst <w@uter.be>
Sun, 10 Jun 2012 20:14:42 +0000 (22:14 +0200)
committerWouter Verhelst <w@uter.be>
Sun, 10 Jun 2012 20:14:42 +0000 (22:14 +0200)
nbd-server.c

index 4f5e3b6c6fd5e01db1b330998695f8360290614a..7bf07a9b31f65a41e2bb59946b15ffd62ee89c97 100644 (file)
@@ -2099,18 +2099,22 @@ void set_peername(int net, CLIENT *client) {
 
        switch(client->server->virtstyle) {
                case VIRT_NONE:
+                       msg2(LOG_DEBUG, "virtualization is off");
                        client->exportname=g_strdup(client->server->exportname);
                        break;
                case VIRT_IPHASH:
+                       msg2(LOG_DEBUG, "virtstyle iphash");
                        for(i=0;i<strlen(peername);i++) {
                                if(peername[i]=='.') {
                                        peername[i]='/';
                                }
                        }
                case VIRT_IPLIT:
+                       msg2(LOG_DEBUG, "virststyle ipliteral");
                        client->exportname=g_strdup_printf(client->server->exportname, peername);
                        break;
                case VIRT_CIDR:
+                       msg3(LOG_DEBUG, "virtstyle cidr %d", client->server->cidrlen);
                        memcpy(&netaddr, &addrin, addrinlen);
                        if(ai->ai_family == AF_INET) {
                                netaddr4 = (struct sockaddr_in *)&netaddr;