Ignore:
Timestamp:
Apr 9, 2010, 3:51:41 PM (15 years ago)
Author:
Silvan Scherrer
Message:

Samba 3.5.x: trunk update to 3.5.2

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source3/utils/net_conf.c

    r414 r429  
    692692
    693693        /*
     694         * start a transaction
     695         */
     696
     697        werr = smbconf_transaction_start(conf_ctx);
     698        if (!W_ERROR_IS_OK(werr)) {
     699                d_printf("error starting transaction: %s\n",
     700                         win_errstr(werr));
     701                goto done;
     702        }
     703
     704        /*
    694705         * create the share
    695706         */
     
    699710                d_fprintf(stderr, _("Error creating share %s: %s\n"),
    700711                          sharename, win_errstr(werr));
    701                 goto done;
     712                goto cancel;
    702713        }
    703714
     
    710721                d_fprintf(stderr, _("Error setting parameter %s: %s\n"),
    711722                          "path", win_errstr(werr));
    712                 goto done;
     723                goto cancel;
    713724        }
    714725
     
    719730                        d_fprintf(stderr, _("Error setting parameter %s: %s\n"),
    720731                                  "comment", win_errstr(werr));
    721                         goto done;
     732                        goto cancel;
    722733                }
    723734        }
     
    727738                d_fprintf(stderr, _("Error setting parameter %s: %s\n"),
    728739                          "'guest ok'", win_errstr(werr));
    729                 goto done;
     740                goto cancel;
    730741        }
    731742
     
    735746                d_fprintf(stderr, _("Error setting parameter %s: %s\n"),
    736747                          "writeable", win_errstr(werr));
    737                 goto done;
    738         }
    739 
    740         ret = 0;
     748                goto cancel;
     749        }
     750
     751        /*
     752         * commit the whole thing
     753         */
     754
     755        werr = smbconf_transaction_commit(conf_ctx);
     756        if (!W_ERROR_IS_OK(werr)) {
     757                d_printf("error committing transaction: %s\n",
     758                         win_errstr(werr));
     759        } else {
     760                ret = 0;
     761        }
     762
     763        goto done;
     764
     765cancel:
     766        werr = smbconf_transaction_cancel(conf_ctx);
     767        if (!W_ERROR_IS_OK(werr)) {
     768                d_printf("error cancelling transaction: %s\n",
     769                         win_errstr(werr));
     770        }
    741771
    742772done:
Note: See TracChangeset for help on using the changeset viewer.