X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=attribute.c;h=42fa421cbbfff275afb9a6d1691911483159bbe7;hp=d94589871562038a7ba96aad85c741de0db05b65;hb=4a4d8f266a79275d7b2c902dc69b5ec8d46406b2;hpb=ef81b9f4f0fa6a26043c68d429c0deeb7c949351 diff --git a/attribute.c b/attribute.c index d9458987..42fa421c 100644 --- a/attribute.c +++ b/attribute.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2009 Andre Noll + * Copyright (C) 1997-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -7,7 +7,6 @@ /** \file attribute.c Attribute handling functions. */ #include -#include #include #include "para.h" @@ -16,7 +15,6 @@ #include "string.h" #include "afh.h" #include "afs.h" -#include "net.h" #include "ipc.h" static struct osl_table *attribute_table; @@ -177,7 +175,7 @@ static void com_lsatt_callback(int fd, const struct osl_object *query) free(laad.pb.buf); } -int com_lsatt(struct rc4_context *rc4c, int argc, char * const * const argv) +int com_lsatt(struct stream_cipher_context *scc, int argc, char * const * const argv) { unsigned flags = 0; struct osl_object options = {.data = &flags, .size = sizeof(flags)}; @@ -205,12 +203,12 @@ int com_lsatt(struct rc4_context *rc4c, int argc, char * const * const argv) } } ret = send_option_arg_callback_request(&options, argc - i, argv + i, - com_lsatt_callback, rc4_send_result, rc4c); + com_lsatt_callback, sc_send_result, scc); if (!ret) { if (argc > 1) - ret = rc4_send_va_buffer(rc4c, "no matches\n"); + ret = sc_send_va_buffer(scc, "no matches\n"); } else if (ret < 0) - rc4_send_va_buffer(rc4c, "%s\n", para_strerror(-ret)); + sc_send_va_buffer(scc, "%s\n", para_strerror(-ret)); return ret; } @@ -278,7 +276,7 @@ out: PARA_NOTICE_LOG("%s\n", para_strerror(-ret)); } -int com_setatt(__a_unused struct rc4_context *rc4c, int argc, char * const * const argv) +int com_setatt(__a_unused struct stream_cipher_context *scc, int argc, char * const * const argv) { if (argc < 3) return -E_ATTR_SYNTAX; @@ -359,16 +357,16 @@ out: free(pb.buf); } -int com_addatt(struct rc4_context *rc4c, int argc, char * const * const argv) +int com_addatt(struct stream_cipher_context *scc, int argc, char * const * const argv) { int ret; if (argc < 2) return -E_ATTR_SYNTAX; ret = send_standard_callback_request(argc - 1, argv + 1, com_addatt_callback, - rc4_send_result, rc4c); + sc_send_result, scc); if (ret < 0) - rc4_send_va_buffer(rc4c, "%s\n", para_strerror(-ret)); + sc_send_va_buffer(scc, "%s\n", para_strerror(-ret)); return ret; } @@ -402,16 +400,16 @@ out: free(pb.buf); } -int com_mvatt(struct rc4_context *rc4c, int argc, char * const * const argv) +int com_mvatt(struct stream_cipher_context *scc, int argc, char * const * const argv) { int ret; if (argc != 3) return -E_ATTR_SYNTAX; ret = send_standard_callback_request(argc - 1, argv + 1, com_mvatt_callback, - rc4_send_result, rc4c); + sc_send_result, scc); if (ret < 0) - rc4_send_va_buffer(rc4c, "%s\n", para_strerror(-ret)); + sc_send_va_buffer(scc, "%s\n", para_strerror(-ret)); return ret; } @@ -474,16 +472,16 @@ static void com_rmatt_callback(int fd, const struct osl_object *query) free(raad.pb.buf); } -int com_rmatt(struct rc4_context *rc4c, int argc, char * const * const argv) +int com_rmatt(struct stream_cipher_context *scc, int argc, char * const * const argv) { int ret; if (argc < 2) return -E_ATTR_SYNTAX; ret = send_standard_callback_request(argc - 1, argv + 1, com_rmatt_callback, - rc4_send_result, rc4c); + sc_send_result, scc); if (ret < 0) - rc4_send_va_buffer(rc4c, "%s\n", para_strerror(-ret)); + sc_send_va_buffer(scc, "%s\n", para_strerror(-ret)); return ret; }