Commit Diff


commit - a975dca965d92cd6af18a82629b597668e1d69d8
commit + 5d86bc14239778053daa5c38c13f2a5c7d63a24c
blob - 3ba1a4e03e9f2acefc5257e0a174a9a26b1ca4a8
blob + dd9f697c5553e01f22524423e79c9641facb19ba
--- amused.c
+++ amused.c
@@ -353,9 +353,9 @@ imsg_compose_event(struct imsgev *iev, uint16_t type, 
 }
 
 int
-main_send_player(uint16_t type, int fd, const void *data, uint16_t datalen)
+main_send_player(uint16_t type, int fd)
 {
-	return imsg_compose_event(iev_player, type, 0, 0, fd, data, datalen);
+	return imsg_compose_event(iev_player, type, 0, 0, fd, NULL, 0);
 }
 
 int
@@ -382,7 +382,7 @@ main_play_song(const char *path)
 	}
 
 	play_state = STATE_PLAYING;
-	main_send_player(IMSG_PLAY, fd, NULL, 0);
+	main_send_player(IMSG_PLAY, fd);
 	return 1;
 }
 
@@ -411,7 +411,7 @@ main_playlist_jump(struct imsgev *iev, struct imsg *im
 		return;
 	}
 
-	main_send_player(IMSG_STOP, -1, NULL, 0);
+	main_send_player(IMSG_STOP, -1);
 	if (!main_play_song(song)) {
 		main_senderr(iev, "can't play");
 		playlist_dropcurrent();
blob - 78c5bb881644a08add919005340ea647ae29cc5c
blob + afcac0d1af9ff25dc42ad7919c5fe922857ddd3e
--- amused.h
+++ amused.h
@@ -118,7 +118,7 @@ void		spawn_daemon(void);
 void		imsg_event_add(struct imsgev *iev);
 int		imsg_compose_event(struct imsgev *, uint16_t, uint32_t,
 		    pid_t, int, const void *, uint16_t);
-int		main_send_player(uint16_t, int, const void *, uint16_t);
+int		main_send_player(uint16_t, int);
 int		main_play_song(const char *);
 void		main_playlist_jump(struct imsgev *, struct imsg *);
 void		main_playlist_resume(void);
blob - db7f92c72422e526c6c67aaac8aac5992c4b2692
blob + 0484778f8774d82944b106cc4ec02de16b8c1ea7
--- control.c
+++ control.c
@@ -287,7 +287,7 @@ control_dispatch_imsg(int fd, short event, void *bula)
 				break;
 			case STATE_PAUSED:
 				play_state = STATE_PLAYING;
-				main_send_player(IMSG_RESUME, -1, NULL, 0);
+				main_send_player(IMSG_RESUME, -1);
 				break;
 			}
 			control_notify(&c->iev, imsg.hdr.type);
@@ -299,11 +299,11 @@ control_dispatch_imsg(int fd, short event, void *bula)
 				break;
 			case STATE_PLAYING:
 				play_state = STATE_PAUSED;
-				main_send_player(IMSG_PAUSE, -1, NULL, 0);
+				main_send_player(IMSG_PAUSE, -1);
 				break;
 			case STATE_PAUSED:
 				play_state = STATE_PLAYING;
-				main_send_player(IMSG_RESUME, -1, NULL, 0);
+				main_send_player(IMSG_RESUME, -1);
 				break;
 			}
 			control_notify(&c->iev, imsg.hdr.type);
@@ -312,18 +312,18 @@ control_dispatch_imsg(int fd, short event, void *bula)
 			if (play_state != STATE_PLAYING)
 				break;
 			play_state = STATE_PAUSED;
-			main_send_player(IMSG_PAUSE, -1, NULL, 0);
+			main_send_player(IMSG_PAUSE, -1);
 			control_notify(&c->iev, imsg.hdr.type);
 			break;
 		case IMSG_CTL_STOP:
 			if (play_state == STATE_STOPPED)
 				break;
 			play_state = STATE_STOPPED;
-			main_send_player(IMSG_STOP, -1, NULL, 0);
+			main_send_player(IMSG_STOP, -1);
 			control_notify(&c->iev, imsg.hdr.type);
 			break;
 		case IMSG_CTL_RESTART:
-			main_send_player(IMSG_STOP, -1, NULL, 0);
+			main_send_player(IMSG_STOP, -1);
 			main_restart_track();
 			control_notify(&c->iev, imsg.hdr.type);
 			break;
@@ -338,12 +338,12 @@ control_dispatch_imsg(int fd, short event, void *bula)
 			main_send_status(&c->iev);
 			break;
 		case IMSG_CTL_NEXT:
-			main_send_player(IMSG_STOP, -1, NULL, 0);
+			main_send_player(IMSG_STOP, -1);
 			main_playlist_advance();
 			control_notify(&c->iev, imsg.hdr.type);
 			break;
 		case IMSG_CTL_PREV:
-			main_send_player(IMSG_STOP, -1, NULL, 0);
+			main_send_player(IMSG_STOP, -1);
 			main_playlist_previous();
 			control_notify(&c->iev, imsg.hdr.type);
 			break;