Make wbinfo --sequence output the sequence number if --domain
authorobnox <obnox@0c0555d6-39d7-0310-84fc-f1cc0bd64818>
Mon, 1 Oct 2007 15:35:05 +0000 (15:35 +0000)
committerobnox <obnox@0c0555d6-39d7-0310-84fc-f1cc0bd64818>
Mon, 1 Oct 2007 15:35:05 +0000 (15:35 +0000)
is specified.

Michael

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@25441 0c0555d6-39d7-0310-84fc-f1cc0bd64818

source/nsswitch/wbinfo.c

index bd5c639..26ae2af 100644 (file)
@@ -423,7 +423,14 @@ static BOOL wbinfo_show_sequence(const char *domain)
 
        /* Display response */
 
-       if (response.extra_data.data) {
+       if (domain) {
+               d_printf("%s : ", domain);
+               if (response.data.sequence_number == (uint32_t)-1) {
+                       d_printf("DISCONNECTED\n");
+               } else {
+                       d_printf("%d\n", response.data.sequence_number);
+               }
+       } else if (response.extra_data.data) {
                char *extra_data = (char *)response.extra_data.data;
                d_printf("%s", extra_data);
                SAFE_FREE(response.extra_data.data);