X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=aft.c;h=c724670391bcbdde581d6cfc6c45342ef1f57650;hb=d5a9e8c8eefe170b6fb62be563c079c818bd3bf8;hp=ba65bc209f202f1ceeebb2b9bdb7ea20aac69196;hpb=e31d5dc4774caa3a90d8be566bfd94b9e5cf1482;p=paraslash.git diff --git a/aft.c b/aft.c index ba65bc20..c7246703 100644 --- a/aft.c +++ b/aft.c @@ -21,6 +21,7 @@ #include "fd.h" #include "ipc.h" #include "portable_io.h" +#include "sideband.h" #include "command.h" static struct osl_table *audio_file_table; @@ -1398,7 +1399,7 @@ static void com_ls_callback(int fd, const struct osl_object *query) } out: if (b.offset) - pass_buffer_as_shm(b.buf, b.offset, &fd); + pass_buffer_as_shm(fd, b.buf, b.offset); free(b.buf); free(opts->data); free(opts->data_ptr); @@ -1806,7 +1807,7 @@ out: if (ret < 0) para_printf(&msg, "%s\n", para_strerror(-ret)); if (msg.offset) - pass_buffer_as_shm(msg.buf, msg.offset, &fd); + pass_buffer_as_shm(fd, msg.buf, msg.offset); free(msg.buf); } @@ -1825,7 +1826,7 @@ static void path_brother_callback(int fd, const struct osl_object *query) int ret = aft_get_row_of_path(path, &path_brother); if (ret < 0) return; - pass_buffer_as_shm((char *)&path_brother, sizeof(path_brother), &fd); + pass_buffer_as_shm(fd, (char *)&path_brother, sizeof(path_brother)); } static void hash_sister_callback(int fd, const struct osl_object *query) @@ -1836,7 +1837,7 @@ static void hash_sister_callback(int fd, const struct osl_object *query) hash_sister = find_hash_sister(hash); if (!hash_sister) return; - pass_buffer_as_shm((char *)&hash_sister, sizeof(hash_sister), &fd); + pass_buffer_as_shm(fd, (char *)&hash_sister, sizeof(hash_sister)); } static int get_row_pointer_from_result(struct osl_object *result, void *private) @@ -2114,7 +2115,7 @@ static void com_touch_callback(int fd, const struct osl_object *query) else if (pmd.num_matches == 0) ret2 = para_printf(&tad.pb, "no matches\n"); if (ret2 >= 0 && tad.pb.offset) - pass_buffer_as_shm(tad.pb.buf, tad.pb.offset, &fd); + pass_buffer_as_shm(fd, tad.pb.buf, tad.pb.offset); free(tad.pb.buf); } @@ -2261,7 +2262,7 @@ static void com_rm_callback(int fd, const struct osl_object *query) pmd.num_matches); } if (ret >= 0 && crd.pb.offset) - pass_buffer_as_shm(crd.pb.buf, crd.pb.offset, &fd); + pass_buffer_as_shm(fd, crd.pb.buf, crd.pb.offset); free(crd.pb.buf); } @@ -2407,7 +2408,7 @@ out: para_printf(&cad.pb, "nothing copied\n"); } if (cad.pb.offset) - pass_buffer_as_shm(cad.pb.buf, cad.pb.offset, &fd); + pass_buffer_as_shm(fd, cad.pb.buf, cad.pb.offset); free(cad.pb.buf); } @@ -2470,7 +2471,7 @@ static void afs_stat_callback(int fd, const struct osl_object *query) if (!buf) return; - pass_buffer_as_shm(buf, strlen(buf), &fd); + pass_buffer_as_shm(fd, buf, strlen(buf)); } /** @@ -2561,7 +2562,7 @@ void aft_check_callback(int fd, __a_unused const struct osl_object *query) return; audio_file_loop(&pb, check_audio_file); if (pb.offset) - pass_buffer_as_shm(pb.buf, pb.offset, &fd); + pass_buffer_as_shm(fd, pb.buf, pb.offset); free(pb.buf); }