s3-param: Rename loadparm_s3_context -> loadparm_s3_helpers
[kai/samba.git] / source3 / printing / print_aix.c
index 57590cc39efd7a71bd281086f86431f2a5b2ab5d..23d9a86fe37a7624e723e4f509ac78e9b774a7b2 100644 (file)
@@ -25,6 +25,8 @@
  */
 
 #include "includes.h"
  */
 
 #include "includes.h"
+#include "system/filesys.h"
+#include "printing/pcap.h"
 
 #ifdef AIX
 bool aix_cache_reload(void)
 
 #ifdef AIX
 bool aix_cache_reload(void)
@@ -49,7 +51,7 @@ bool aix_cache_reload(void)
 
        iEtat = 0;
        /* scan qconfig file for searching <printername>:       */
 
        iEtat = 0;
        /* scan qconfig file for searching <printername>:       */
-       for (;(line = fgets_slash(NULL, 1024, pfile)); safe_free(line)) {
+       for (;(line = fgets_slash(NULL, 1024, pfile)); free(line)) {
                if (*line == '*' || *line == 0)
                        continue;
 
                if (*line == '*' || *line == 0)
                        continue;
 
@@ -65,7 +67,7 @@ bool aix_cache_reload(void)
                                if (strcmp(p, "bsh") != 0) {
                                        name = talloc_strdup(ctx, p);
                                        if (!name) {
                                if (strcmp(p, "bsh") != 0) {
                                        name = talloc_strdup(ctx, p);
                                        if (!name) {
-                                               safe_free(line);
+                                               SAFE_FREE(line);
                                                x_fclose(pfile);
                                                TALLOC_FREE(ctx);
                                                return false;
                                                x_fclose(pfile);
                                                TALLOC_FREE(ctx);
                                                return false;
@@ -84,8 +86,8 @@ bool aix_cache_reload(void)
                                /* name is found without stanza device  */
                                /* probably a good printer ???          */
                                iEtat = 0;
                                /* name is found without stanza device  */
                                /* probably a good printer ???          */
                                iEtat = 0;
-                               if (!pcap_cache_add(name, NULL)) {
-                                       safe_free(line);
+                               if (!pcap_cache_add(name, NULL, NULL)) {
+                                       SAFE_FREE(line);
                                        x_fclose(pfile);
                                        TALLOC_FREE(ctx);
                                        return false;
                                        x_fclose(pfile);
                                        TALLOC_FREE(ctx);
                                        return false;
@@ -99,8 +101,8 @@ bool aix_cache_reload(void)
                        } else if (strstr_m(line, "device")) {
                                /* it's a good virtual printer */
                                iEtat = 0;
                        } else if (strstr_m(line, "device")) {
                                /* it's a good virtual printer */
                                iEtat = 0;
-                               if (!pcap_cache_add(name, NULL)) {
-                                       safe_free(line);
+                               if (!pcap_cache_add(name, NULL, NULL)) {
+                                       SAFE_FREE(line);
                                        x_fclose(pfile);
                                        TALLOC_FREE(ctx);
                                        return false;
                                        x_fclose(pfile);
                                        TALLOC_FREE(ctx);
                                        return false;