Permalink
Browse files

Woops, blatintly misspelling thangs.

  • Loading branch information...
ngerakines committed Feb 25, 2010
1 parent eb12bd6 commit afdc25459c09eeb81658eeb48dbc4b45363dcb55
Showing with 17 additions and 17 deletions.
  1. +3 −3 README
  2. +1 −1 clients/php/README
  3. +3 −3 clients/php/barbershop.c
  4. +1 −1 clients/php/php_barbershop.h
  5. +2 −2 src/barbershop.c
  6. +5 −5 src/client.c
  7. +1 −1 src/scores.c
  8. +1 −1 src/scores.h
View
6 README
@@ -75,16 +75,16 @@ When there are no more items to return a '-1' is returned.
C: NEXT\r\n
S: +-1\r\n
-'PEAK'
+'PEEK'
Return the next item in the queue without removing it from the queue.
- C: NEXT\r\n
+ C: PEEK\r\n
S: +61231\r\n
When there are no more items to return a '-1' is returned.
- C: NEXT\r\n
+ C: PEEK\r\n
S: +-1\r\n
'SCORE <item id>'
View
@@ -22,7 +22,7 @@ This extension exposes one class, 'Barbershop'.
$bs = new Barbershop();
$bs->connect('127.0.0.1', 8002);
assert($bs->update('5000', 1) == "+OK");
- assert($bs->peak() == "+5000");
+ assert($bs->peek() == "+5000");
assert($bs->next() == "+5000");
assert($bs->next() == "+-1");
View
@@ -42,7 +42,7 @@ static zend_function_entry barbershop_functions[] = {
PHP_ME(Barbershop, connect, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Barbershop, close, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Barbershop, next, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(Barbershop, peak, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(Barbershop, peek, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Barbershop, update, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Barbershop, score, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Barbershop, info, NULL, ZEND_ACC_PUBLIC)
@@ -598,7 +598,7 @@ PHP_METHOD(Barbershop, next) {
RETURN_STRINGL(response, response_len, 0);
}
-PHP_METHOD(Barbershop, peak) {
+PHP_METHOD(Barbershop, peek) {
zval *object;
BarbershopSock *barbershop_sock;
char *key = NULL, *cmd, *response;
@@ -612,7 +612,7 @@ PHP_METHOD(Barbershop, peak) {
RETURN_FALSE;
}
- cmd_len = spprintf(&cmd, 0, "PEAK\r\n");
+ cmd_len = spprintf(&cmd, 0, "PEEK\r\n");
if (barbershop_sock_write(barbershop_sock, cmd, cmd_len) < 0) {
efree(cmd);
RETURN_FALSE;
@@ -30,7 +30,7 @@ PHP_METHOD(Barbershop, info);
PHP_METHOD(Barbershop, update);
PHP_METHOD(Barbershop, score);
PHP_METHOD(Barbershop, next);
-PHP_METHOD(Barbershop, peak);
+PHP_METHOD(Barbershop, peek);
#ifdef PHP_WIN32
#define PHP_BARBERSHOP_API __declspec(dllexport)
View
@@ -132,10 +132,10 @@ void on_read(int fd, short ev, void *arg) {
}
app_stats.updates += 1;
reply(fd, "+OK\r\n");
- } else if (ntokens == 2 && strcmp(tokens[COMMAND_TOKEN].value, "PEAK") == 0) {
+ } else if (ntokens == 2 && strcmp(tokens[COMMAND_TOKEN].value, "PEEK") == 0) {
int next;
pthread_mutex_lock(&scores_mutex);
- PeakNext(scores, &next);
+ PeekNext(scores, &next);
pthread_mutex_unlock(&scores_mutex);
char msg[32];
sprintf(msg, "+%d\r\n", next);
View
@@ -93,10 +93,10 @@ int main(int argc, char **argv) {
action = 2;
}
- if (strcmp(argv[optind], "peak") == 0) {
+ if (strcmp(argv[optind], "peek") == 0) {
if (argc - optind != 1) {
- printf("The 'peak' command requires 0 command parameters.\n");
- printf("usage: client [--ip=] [--port=] peak\n");
+ printf("The 'peek' command requires 0 command parameters.\n");
+ printf("usage: client [--ip=] [--port=] peek\n");
exit(1);
}
action = 3;
@@ -121,7 +121,7 @@ int main(int argc, char **argv) {
}
if (action == 0) {
- printf("Invalid command given, should be either update, next, peak or info.\n");
+ printf("Invalid command given, should be either update, next, peek or info.\n");
printf("usage: client [--ip=] [--port=] <command> [... command arguments]\n");
exit(1);
}
@@ -165,7 +165,7 @@ int main(int argc, char **argv) {
send_command(sd, "NEXT\r\n");
break;
case 3:
- send_command(sd, "PEAK\r\n");
+ send_command(sd, "PEEK\r\n");
break;
case 4:
send_command(sd, "INFO\r\n");
View
@@ -259,7 +259,7 @@ PoolNode *promoteItem(PoolNode *list, int score, int item, int old_score) {
return NULL;
}
-void PeakNext(PoolNode *head, int *next_item) {
+void PeekNext(PoolNode *head, int *next_item) {
if (head == NULL) {
*next_item = -1;
return;
View
@@ -52,7 +52,7 @@ int find_item(int item, int query);
PoolNode *preparePromotion(PoolNode *head, int item, int score);
PoolNode *promoteItem(PoolNode *list, int score, int item, int old_score);
-void PeakNext(PoolNode *head, int *next_item);
+void PeekNext(PoolNode *head, int *next_item);
PoolNode *NextItem(PoolNode *list, int *next_item);
#ifdef DEBUG

0 comments on commit afdc254

Please sign in to comment.